package democache.computer;

/**
 * @author Brook
 * ExpensiveFunction类是耗时计算的实现类，实现了Computable接口，
 * 但是其本身不具备缓存功能，也不需要考虑缓存的事情
 */
public class ExpensiveFunction implements Computable<String, Integer>{
    @Override
    public Integer compute(String arg) throws Exception {
        Thread.sleep(5000);
        return Integer.valueOf(arg);
    }
}
